package Java_高级教程;

import sun.rmi.transport.Connection;

import java.util.LinkedList;

public class Java_LinkedList {
    public static void main(String[] args){
        LinkedList<String> sites=new LinkedList<String>();
        sites.add("百度");
        sites.add("小米");
        sites.add("哔哩哔哩");
        sites.addLast("京东");
        sites.add(2,"苹果");
        sites.removeFirst();
        for(String site:sites){
            System.out.println(site);
        }
        System.out.println("\n");
        System.out.println(sites.getFirst());
        System.out.println(sites.getLast());
    }
}
